#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "StructuredClassifier.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Port;

/// <summary>
/// EncapsulatedClassifier
/// An EncapsulatedClassifier may own Ports to specify typed interaction points.
/// </summary>
class UMLMODEL_EXPORT EncapsulatedClassifier : public StructuredClassifier {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Methods
public: // Properties
    /// <summary>
    /// ownedPorts getter
    /// The Ports owned by the EncapsulatedClassifier.
    /// </summary>
    vector<shared_ptr<Port>>& ownedPorts();

private: // Fields
    /// <summary>
    /// ownedPorts
    /// The Ports owned by the EncapsulatedClassifier.
    /// </summary>
    vector<shared_ptr<Port>> ownedPorts_;

};

} // namespace uml
